import VueRouter from 'vue-router'
import home from './components/tabbar/homeContainer.vue'
import member from './components/tabbar/memberContainer.vue'
import shopCar from './components/tabbar/shopCarContainer.vue'
import search from './components/tabbar/searchContainer.vue'
import newsList from './components/news/newsList.vue'
import newsInfo from './components/news/newsInfo.vue'
import photoList from './components/photo/photoList.vue'
import photoInfo from './components/photo/photoInfo.vue'
import goodsList from './components/good/goodsList.vue'
import goodsInfo from './components/good/goodsInfo.vue'
import goodsDesc from './components/good/goodsDesc.vue'
import goodsComments from './components/good/goodsComments.vue'

var router = new VueRouter({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        { path: '/home', component: home },
        { path: '/member', component: member },
        { path: '/shopCar', component: shopCar },
        { path: '/search', component: search },
        { path: '/home/newsList', component: newsList },
        { path: '/home/newsInfo/:id', component: newsInfo },
        { path: '/home/photoList', component: photoList },
        { path: '/home/photoInfo/:id', component: photoInfo },
        { path: '/home/goodsList', component: goodsList },
        { path: '/home/goodsInfo/:id', component: goodsInfo },
        { path: '/home/goodsDesc/:id', component: goodsDesc, name: 'goodsDesc' },
        { path: '/home/goodsComments/:id', component: goodsComments, name: 'goodsComments' },


    ]
})
export default router